package main

import (
	"fmt"
	"sync"
)

var strPool = sync.Pool{
	New: func() interface{} {
		return "test str"
	},
}

func main() {
	for i := 0; i < 1000; i++ {
		str := strPool.Get()
		fmt.Println("--get from pool:", str)
		strPool.Put("test str returned")
	}
}
